home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga CD-Sensation: Golden Games
/
Amiga CD-Sensation - Ausgabe 2 - Golden Games (1996)(GTI - Schatztruhe)(DE)[!].iso
/
Shoot'em Up
/
TankHunter
/
Sources.lha
/
sources
/
GetWall.a
< prev
next >
Wrap
Text File
|
1992-10-17
|
874b
|
86 lines
section text,code
xref _Mask
xref _gplane
procstart
xdef @GetWall
@GetWall:
movem.l D2/D3,-(sp)
move.w D2,D0
asr.w #$03,D0
mulu #40,D3
add.w D3,D0
not.b D2
lea _Mask(A4),A0
btst D2,(A0,D0)
bne set
notset moveq #0,D0
movem.l (sp)+,D2/D3
rts
set moveq #1,D0
movem.l (sp)+,D2/D3
rts
procend
procstart
xdef @ClearWall
@ClearWall:
movem.l D2/D3,-(sp)
move.w D2,D0
asr.w #$03,D0
mulu #40,D3
add.w D3,D0
not.b D2
lea _Mask(A4),A0
bclr D2,(A0,D0)
movem.l (sp)+,D2/D3
rts
procend
procstart
xdef @WritePixel
@WritePixel:
movem.l D3,-(sp)
move.w D0,D3
asr.w #$03,D3
mulu #40,D1
add.w D1,D3
not.b D0
moveq #0,D1
lea.l _gplane(A4),A0
wploop move.l (A0)+,A1
btst D1,D2
beq wpclear
wpset bset D0,(A1,D3)
bra wpend
wpclear bclr D0,(A1,D3)
wpend addq.w #1,D1
cmp.w #4,D1
bmi wploop
movem.l (sp)+,D3
rts
procend
END